package com.springboot.mybatis01helloworld.bean;

import lombok.Data;

import java.io.Serializable;

@Data
//实现序列化接口，使Emp对象能被序列化进入二级缓存
public class Emp implements Serializable {
    private Integer id;
    private String empName;//emp_name
    private String gender;
    private Integer age;
    private double empSalary;//emp_salary
    //开启驼峰命名自动映射


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEmpName() {
        return empName;
    }

    public void setEmpName(String empName) {
        this.empName = empName;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public double getEmpSalary() {
        return empSalary;
    }

    public void setEmpSalary(double empSalary) {
        this.empSalary = empSalary;
    }

    @Override
    public String toString() {
        return "Emp{" +
                "id=" + id +
                ", empName='" + empName + '\'' +
                ", gender='" + gender + '\'' +
                ", age=" + age +
                ", empSalary=" + empSalary +
                '}';
    }
}
